package com.cryptoneedle.center.source.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Properties;

/**
 * <p>description:  </p>
 *
 * @author CryptoNeedle
 * @date 2025-06-23
 */
@Getter
@AllArgsConstructor
public class Postgresql extends Database {

    public final String jdbcDriverClass = "org.postgresql.Driver";

    private final String jdbcUrlTemplate = "jdbc:postgresql://%s:%d/%s";

    @Override
    public String getJdbcUrlTemplate(ConnectType connectType) {
        return this.getJdbcUrlTemplate();
    }

    @Override
    public Properties getProperties() {
        Properties properties = new Properties();
        properties.setProperty("prepareThreshold", "0");
        return properties;
    }

    @Override
    public String getDatabaseValidSql() {
        return "SELECT 1";
    }

    @Override
    public String getDatabaseVersionSql() {
        return "SELECT version() AS version";
    }

    @Override
    public String getDatabaseStatisticSql() {
        return "";
    }

    @Override
    public String getTableSql(String databaseName) {
        return "";
    }

    @Override
    public String getColumnSql(String databaseName) {
        return "";
    }

    @Override
    public String getConstraintPrimarySql(String databaseName) {
        return "";
    }

    @Override
    public String getConstraintUniqueSql(String databaseName) {
        return "";
    }

    @Override
    public String getConstraintForeignSql(String databaseName) {
        return "";
    }

    @Override
    public String getConstraintCheckSql(String databaseName) {
        return "";
    }

    @Override
    public String getIndexUniqueSql(String databaseName) {
        return "";
    }

    @Override
    public String getDmlTrackSql(String databaseName) {
        return "";
    }
}